﻿using System;
using System.Collections.Generic;
using OpenTK;
using System.Text;

namespace Xeno.Maths
{
    public class XenoMath
    {
        
        public static float Cos(float degrees)
        {
            return (float)Math.Cos((double)Deg2Rad(degrees));
        }
        
        public static float Sin(float degrees)
        {
            return (float)Math.Sin((double)Deg2Rad(degrees));
        }
        
        public static float VectorAngle(float x, float y)
        {
            return (float)Math.Atan2(y, x);
        }
        
        public static float VectorAngle(Vector2 vec)
        {
            return VectorAngle(vec.X, vec.Y);
        }

        public static float Deg2Rad(float ang)
        {
            return ang / 57.29578f;
        }
        
        public static float Rad2Deg(float val)
        {
            return val * 57.29578f;
        }

    }

}
